﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace LaughingDog.Input
{
    /// <summary>
    /// 
    /// </summary>
    public class ThumbStick
    {
        private Vector2 mPosition = Vector2.Zero;

        /// <summary>
        /// 
        /// </summary>
        public Vector2 Position { get { return mPosition; } }

        /// <summary>
        /// 
        /// </summary>
        public Single X { get { return Position.X; } }

        /// <summary>
        /// 
        /// </summary>
        public Single Y { get { return Position.Y; } }

        /// <summary>
        /// 
        /// </summary>
        public ThumbStick()
        {
        }

        /// <summary>
        /// Updates this AnalogStick.
        /// </summary>
        /// <param name="currentState">The current state of the GamePad.</param>
        public void Update(GamePadState currentState)
        {
            mPosition = new Vector2(currentState.ThumbSticks.Left.X, currentState.ThumbSticks.Left.Y);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Boolean AsDPadPushed()
        {
            return false;
        }
    }
}
